Subject: Using WSAASyncSelect() or select() to notify Client of succesful asynch connect()?
I am developing a service type application under Windows NT with Visual C++ for NT. The PC is on a ethernet LAN and using TCP/IP protocol. I am required to establish multiple Server and Client role sockets in a thread environment. (i.e preferably not a Windows application). My problem is asynchronous notification of socket connections when establishing the multiple Client role sockets. The following requirements must apply:
1. The Server process is not established (i.e. not executing yet)
2. The Client sockets are non-blocking
3. The notification is asynchronous for multiple socket connections
Question: After performing the connect() call and receiving the WSAEWOULDBLOCK error message back, how do you get asynchronous notification of successful connection on a socket when the Server process is finally powered on?
Statements:
1) Having the SOCKET handle included into a write FD_SET and calling select() with no timeout does not seem to work. (e.g.Windows Sockets Specification version 1.1 pg 25,26).(Microsoft indicated this didn't seem to work right)
2) As a Windows application using WSAAsynchSelect with FD_CONNECT, after a short period of time (15 sec) a successful notification is posted indicating WSAECONNREFUSED using WSAGETSELECTERROR macro.
3) If the Server process is already executing (i.e. listen()ing) the connection can be established with the observation of the following anomoly:
3.a) When the socket is set to non-blocking the connect() call returns WSAEWOULDBLOCK even when the Sever process is already listen()ing. ...A following select() call returns and the communication over the socket is available. ...Or A followig WSAAsynchSelect with FD_CONNECT successfully notifies the Window Application.
If any one has had success in a similar application or I am just interpreting the spec wrong please let me know. Thanks, BLB.
From news@bigblue.oit.unc.edu Sat May 31 05:02:50 1994
Received: from bigblue.oit.unc.edu by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
id AA14727; Tue, 31 May 1994 15:56:09 -0400
Received: by bigblue.oit.unc.edu (AIX 3.2/UCB 5.64/4.03)
id AA10727; Tue, 31 May 1994 15:30:49 -0400
Received: from GATEWAY by bigblue with netnews
for winsock@sunsite.unc.edu (winsock@sunsite.unc.edu)
To: winsock@sunsite.unc.edu
Date: 31 May 1994 12:02:50 -0700
From: lchiu@crl.com (Laurence Chiu)
Message-Id: <Q$twjK5QQ3EL064yn@crl.com>
Organization: CRL Dialup Internet Access
Sender: ses
References: <fred.1.000D13EB@gmm.gu.se>
Subject: Re: Win32s on networked Windows
In article <fred.1.000D13EB@gmm.gu.se>, Fred Sorensson wrote:
: We recently got a Nowell NetWare network, and I am now running Windows from
: the server, which works fine. The server Windows, however, does not have
: win32s installed, and when I tried to install it from my machine, tie
: installation program just died with a flash, and left me with Windows still
: without the 32 bits. I found nothing in the Win32s files that said anything
: about networked environments. If there is someone who has any knowledge of how
: to solve this, I would be very grateful, since I would really prefer to run
: the networked Windows version.
:
In all likelihood you've struck the same problem that I have when
trying to install software that needs to put files (usaully DLL's)
into the windows\system directory. SInce it's on the LAN, unless you
are the LAN administrator, you will not be able to write to that
directory. This has crossed me several times. I can't even install a
Windows fax package since it wants to copy the fax driver to the